#ifndef HOURSBYPERSON_H
#define HOURSBYPERSON_H

#include <QWidget>
#include <QStandardItemModel>
#include <QUrl>
//网络相关头文件

#include <QNetworkAccessManager>
#include <QNetworkRequest>
#include <QNetworkReply>
//JSON相关头文件
#include <QJsonDocument>
#include <QJsonObject>
#include <QJsonArray>
#include "publicstruct.h"

class MainWindow ;

namespace Ui {
class HoursByPerson;
}

class HoursByPerson : public QWidget
{
    Q_OBJECT

public:
    explicit HoursByPerson(QWidget *parent = nullptr);
    ~HoursByPerson();

private slots:
    void on_cb_quickQuery_currentTextChanged(const QString &arg1);

    void on_bt_query_clicked();

    void on_bt_export_clicked();

    void on_tv_tatolHours_doubleClicked(const QModelIndex &index);

    void ShowTooltip(QModelIndex index);


private slots:



    void on_bt_exportByProject_clicked();

private:
    Ui::HoursByPerson *ui;
    QStandardItemModel* m_totalHoursModel,*m_detailHoursModel,*m_holidayHoursModel;

    QList<UserHolidayInfo> getUserHolidayInfo(QString &userName,QString &startDate, QString &endDate);

    QList<UserHolidayInfo>  ParseJson(const QString &str);
    MainWindow *m_mwindow ;
};

#endif // HOURSBYPERSON_H
